package com.chinasoft.mall.widget;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.util.AttributeSet;
import android.widget.TextView;

public class CancleTextView extends TextView {
	private Paint paint;

	public CancleTextView(Context context, AttributeSet attrs) {
		super(context, attrs);
		paint = new Paint();// 初始化画笔
		paint.setAntiAlias(true);// 去除锯齿。
		paint.setColor(0xff000000);
	}

	@Override
	protected void onDraw(Canvas canvas) {
		super.onDraw(canvas);
		canvas.save();
		canvas.drawLine(0, getMeasuredHeight()/2, getMeasuredWidth(), getMeasuredHeight()/2, paint);
		canvas.restore();
	}
}
